package com.goodluck.goodluckim.db.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Unique;

/**
 * Created by wyj on 2018/9/7.
 */
@Entity
public class IMMessage {
    @Id
    private Long id;
    /**
     * 消息id
     */
    @Unique
    private long messageId;
    /**
     * 是发送者还是接收者
     */
    private int messageDirection;
    /**
     * 发送者ID
     */
    private long senderUserId;
    /**
     * 接收时间
     */
    private long receivedTime;
    /**
     * 接收状态  isRead isDownload isRetrieved isMultipleReceive
     */
    private int receivedStatus;
    /**
     * 发送时间
     */
    private long sendTime;
    /**
     * 发送状态     SENDING,FAILED, SENT, RECEIVED,READ, DESTROYED,CANCELED
     */
    private int sendStatus;
    /**
     * 标题
     */
    private String objectName;
    /**
     * 文本内容
     */
    private String messageContent;
    /**
     * 未读数
     */
    private int isUnread;
    /**
     * 置顶 （插入时间，按时间排序）
     */
    private long stickTime;
    /**
     * 接收者ID
     */
    private long receiveId;
    /**
     * 会话类型（个聊、群聊、群通知等）
     */
    private int sessionType;
    /**
     * 消息类型（个聊（文本、图片等），群聊（文本、图片等），群通知（加入群、申请加入等））
     */
    private int messageType;
    /**
     * 消息来源（个聊是发送者ID、群聊是群ID、其他消息如消息通告可在后台配置固定ID）
     * 该参数用来区分是否需要生成多条会话
     */
    @Unique
    private long sessionID;
    /**
     * 附件信息JSON串(语言、视频、定位等信息)
     */
    private String msgAttachment;
    /**
     * 附件状态	def（默认状态，未开始），fail（传输失败），transferred（传输成功），transferring（正在传输）
     */
    private int attachStatus;
    /**
     * @名称
     */
    private String callUser;
    /**
     * @userid集合
     */
    private String callUserIds;
    /**
     * 附加
     */
    private String extra;

    @Generated(hash = 1173044461)
    public IMMessage(Long id, long messageId, int messageDirection,
                     long senderUserId, long receivedTime, int receivedStatus, long sendTime,
                     int sendStatus, String objectName, String messageContent, int isUnread,
                     long stickTime, long receiveId, int sessionType, int messageType,
                     long sessionID, String msgAttachment, int attachStatus, String callUser,
                     String callUserIds, String extra) {
        this.id = id;
        this.messageId = messageId;
        this.messageDirection = messageDirection;
        this.senderUserId = senderUserId;
        this.receivedTime = receivedTime;
        this.receivedStatus = receivedStatus;
        this.sendTime = sendTime;
        this.sendStatus = sendStatus;
        this.objectName = objectName;
        this.messageContent = messageContent;
        this.isUnread = isUnread;
        this.stickTime = stickTime;
        this.receiveId = receiveId;
        this.sessionType = sessionType;
        this.messageType = messageType;
        this.sessionID = sessionID;
        this.msgAttachment = msgAttachment;
        this.attachStatus = attachStatus;
        this.callUser = callUser;
        this.callUserIds = callUserIds;
        this.extra = extra;
    }

    @Generated(hash = 1610895367)
    public IMMessage() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getMessageId() {
        return this.messageId;
    }

    public void setMessageId(long messageId) {
        this.messageId = messageId;
    }

    public int getMessageDirection() {
        return this.messageDirection;
    }

    public void setMessageDirection(int messageDirection) {
        this.messageDirection = messageDirection;
    }

    public long getSenderUserId() {
        return this.senderUserId;
    }

    public void setSenderUserId(long senderUserId) {
        this.senderUserId = senderUserId;
    }

    public long getReceivedTime() {
        return this.receivedTime;
    }

    public void setReceivedTime(long receivedTime) {
        this.receivedTime = receivedTime;
    }

    public int getReceivedStatus() {
        return this.receivedStatus;
    }

    public void setReceivedStatus(int receivedStatus) {
        this.receivedStatus = receivedStatus;
    }

    public long getSendTime() {
        return this.sendTime;
    }

    public void setSendTime(long sendTime) {
        this.sendTime = sendTime;
    }

    public int getSendStatus() {
        return this.sendStatus;
    }

    public void setSendStatus(int sendStatus) {
        this.sendStatus = sendStatus;
    }

    public String getObjectName() {
        return this.objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public String getMessageContent() {
        return this.messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public int getIsUnread() {
        return this.isUnread;
    }

    public void setIsUnread(int isUnread) {
        this.isUnread = isUnread;
    }

    public long getStickTime() {
        return this.stickTime;
    }

    public void setStickTime(long stickTime) {
        this.stickTime = stickTime;
    }

    public long getReceiveId() {
        return this.receiveId;
    }

    public void setReceiveId(long receiveId) {
        this.receiveId = receiveId;
    }

    public int getSessionType() {
        return this.sessionType;
    }

    public void setSessionType(int sessionType) {
        this.sessionType = sessionType;
    }

    public int getMessageType() {
        return this.messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public long getSessionID() {
        return this.sessionID;
    }

    public void setSessionID(long sessionID) {
        this.sessionID = sessionID;
    }

    public String getMsgAttachment() {
        return this.msgAttachment;
    }

    public void setMsgAttachment(String msgAttachment) {
        this.msgAttachment = msgAttachment;
    }

    public int getAttachStatus() {
        return this.attachStatus;
    }

    public void setAttachStatus(int attachStatus) {
        this.attachStatus = attachStatus;
    }

    public String getCallUser() {
        return this.callUser;
    }

    public void setCallUser(String callUser) {
        this.callUser = callUser;
    }

    public String getCallUserIds() {
        return this.callUserIds;
    }

    public void setCallUserIds(String callUserIds) {
        this.callUserIds = callUserIds;
    }

    public String getExtra() {
        return this.extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }
}
